import {JsonController,Controller, Render, Get, UseBefore, Session,Req,Res,Ctx,QueryParams,UseInterceptor,Post,Body, Params} from "routing-controllers";
import { config } from "../../config";
import { ClassListModel} from "../../model/ClassListModel";
import { Service, Inject } from "typedi";
import {ClassListServiceImpl} from '../../service/impl/ClassListServiceImpl'
import TokenLoginMiddlewares from '../../middleware/TokenLoginMiddlewares';
import { JsonResponseInterceptor } from "../../middleware/JsonResponseMiddlewares";

@Service()
@JsonController(`${config.apiurl}/v1/class`)
@UseInterceptor(JsonResponseInterceptor)
@UseBefore(TokenLoginMiddlewares)
export class ClassListControllerApi {



    @Inject()
    private ClassListServiceImpl!:ClassListServiceImpl;


    @Get("/getClassScreen")
    public async getClassScreen (@Res() response: any,@Session() session:any,@QueryParams() params:ClassListModel): Promise<any> {
        return await this.ClassListServiceImpl.getClassScreen(params.entity_name);
    }

    @Get("/getClassListValue")
    public async getClassListValue (@Res() response: any,@Session() session:any,@QueryParams() params:any): Promise<any> {
        return await this.ClassListServiceImpl.getClassListValue(params);
         

    }



  }